package com.neuedu.date;

import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;


public class DateExample3 {
	public static void main(String[] args) throws ParseException {
		//java.sql.Date 与java.util.Date 区别
		
		String dateString="2018-05-06";
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		java.util.Date date=sdf.parse(dateString);
		
		
		/*Date sqlDate=new Date(System.currentTimeMillis());*/
		Date sqlDate=new Date(date.getTime());
		System.out.println(sqlDate);
		
		
	}

}
